package org.test.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.test.dao.IUserDao;
import org.test.model.Article;

@Component
public class ServiceOne {
	
	@Autowired
	@Qualifier("userDao")
	private IUserDao userDao = null;
	
	public Object doSomeThing(int defaultPerPage) {
		String str = "class :ServiceOne, method :doSomeThing()"+new Date()+","+ defaultPerPage;
		System.out.println(str);
		return str;
	}
	
	
	public List<Article> getArticle(){
		return userDao.getArticlesByUserID(1);
	}


	public IUserDao getUserDao() {
		return userDao;
	}
	
	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}
	
}
